<%--
  Created by IntelliJ IDEA.
  User: H64
  Date: 2021/4/21
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户信息</title>
</head>
<body>
<div>
    <%
        //定义访问次数
        //定义访问次数
        Integer count  = (Integer) application.getAttribute("count");

        //第一次获取时，没有向application容器加count变量，此时count为空
        //第二次获取时，向application容器加count变量，此时count不为空
        if (count == null){

            count = 1;//初始化count

        }else {
            count++;//获取每次登录时的访问次数
        }
        application.setAttribute("count",count);//向application容器加入count访问次数的变量
    %>
    <%

        Integer i = (Integer) application.getAttribute("count");
        out.print("本站访问人数为："+i);
    %>
</div>
<form action="AddUserServlet" method="post" class="form-horizontal">
    <div>
        <ul style="list-style-type: none">
            <li>
                <p style="margin-left: 120px">个人信息</p>
            </li>
            <li>
                <span style="padding-right: 16px">用户名：</span>
                <input type="text" name="name" value="">
            </li>
            <li>
                <span style="padding-right: 32px">性别：</span>
                <select name="sex" >
                    <option value="女">女</option>
                    <option value="男">男</option>
                </select>
            </li>
            <li>
                <span style="padding-right: 32px">年龄：</span>
                <input type="text" name="age" >
            </li>
            <li>
                <span style="padding-right: 16px">身份证：</span>
                <input type="text" name="idcard" >
            </li>
            <li>
                <span>工作单位：</span>
                <input type="text" name="work" value="">
            </li>
            <li>
                <span style="padding-right: 32px">国籍：</span>
                <input type="text" name="country" value="">
            </li>
            <li>
                <span style="padding-right: 32px">电话：</span>
                <input type="text" name="tel" value="">
            </li>
            <li>
                <button type="submit" name="button" style="float:left;">确认</button>
                <button type="button" name="button" style="float: left;margin-left: 164px">取消</button>
            </li>
        </ul>
    </div>
</form>

</body>
</html>
